home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
tex
/
mfrm240.zip
/
MM.DOC
< prev
next >
Wrap
Text File
|
1991-05-02
|
14KB
|
360 lines
MM 2.4 - Mainframe Mania - 1 May 1991
A Utility to Convert Mainframe Data
Handles zoned decimals, overpunch, and trailing signs.
(c) 1987-1991 by Ken Goosens
A utility to convert downloaded mainframe numeric data to a
format that PC programs can read.
Answers to questions about MM, and the latest version, can be gotten
from the bulletin board Your Place at 703-978-6360.
HISTORY OF CHANGES
Version 2.4 - Released 1 May 1991
Speed increased when having runs of same values in the
same field. Runs slightly slower when every consecutive
value in a field in the records changes. On data with
signficant redundancy, easily get 40% in speed.
Recompiled under Professional Basic 7.1.
ZIP file renamed MFRMver rather than MMver because there were
too many conflicts for the name (Menu Master, etc.).
Version 2.3 - Released 2 March 1988
Numbers converted from scientific notation could have
trailing zeros after a decimal point. Now elminated.
Verification added that each record really does end with
the stated record delimitor. Processing halted if does
not. This check can be effectively eliminated by declaring
all characters to be data with no record delimitor. Check
applies to all but last record in the file.
Version 2.2
Recompiled under QB 4.0.
Three bug fixes. (1) Was not converting overstriked numbers
properly when the number completely filled the field, e.g.
in a field of length 5, "1000A" would convert to "1000"
rather than to "10001", whereas "01000A" would convert
properly. (2) When running in single step mode, the
display for the number converted was not right when a
shorter number followed a longer. (3) Was truncating the least
significant digits in some cases even though there was
room in the field.
Version 2.1
Will no longer write out real numbers in scientific notation.
Occasionally, depending on the value, MM would write out a real
number in scientific notation. For example, 2.1E-002 rather
than .021. Very few PC programs can read scientific notation.
2.1 will check whether output is in scientific format and
convert the number to a standard decimal if necessary. As
a side note, Turbo Basic is far more prone to write out in
scientific format that Microsoft QuickBasic.
Version 2.01 - Released Nov 21, 1987
Treats a blank at the end of a numeric field the same
as a plus sign when looking for a trailing sign. Some mainframe
programs in the trailing sign field will leave a blank rather than
a plus sign and only put in a negative sign. Hence "0031 " is
treated as "+0031" in version 2.01, whereas in 2.00 it is treated
as is. If you said the number had 1 decimal place, 2.00 returned
" 31" whereas 2.01 returns " 3.1". Version 2.01 thus properly
adjusts where the decimal point is added when a number with a trailing
sign has a blank for the sign.
Opening screen now shows format for invoking MM from DOS.
DISTRIBUTION RIGHTS
Individuals as well as organizations and companies are free to use this
program, so long as nothing is charged for the program. The author
does not ask for any payment for its use. However, you are not free to
use this program to make money, nor to sell the program, nor to base
a commercial program on it, without the explicit consent of the author.
FILE THAT SHOULD COME WITH THIS PROGRAM
MM.BAS - QuickBasic source code
MM.EXE - Compiled, executable program
MM.DOC - this documentation
MM.ZON - sample mainframe file to be converted
CONV.TBL - specifics on how to read and convert mainframe data in MM.ZON
WHAT DOES MM DO?
This is a routine whose only purpose is to take mainframe data and
convert it to a form that PC's can process. There are three persistent
problems it solves:
o mainframe is often stored with assumed decimal points ("zoned"
numbers)
o mainframe data is often stored with the sign as an "overstrike"
on the last character.
o signs are often stored as a trailing character after the number
rather than in front of the number.
These problems are both combined when mainframe data is generated in
COBOL using signed numeric pictures where the sign is not a leading
separate. For example, in the picture S99V9(4) the S produces an
"overpunch" on the last character, in which (going) back to card
decks) the sign is "overpunced" over the numeric digit and the digits
are not stored with a decimal point (the V is where is implied
decimal goes).
Very few databases on PC's will properly interprete such "zoned" decimals
and virtually none will handle the overstrike (it will appear to be
non-numeric) or trailing sign.
What usually happens with zoned data is that divided by a power of
ten to shift the decimal over, but there is no solution to the latter
problem.
MM will handle zoned decimals, overpunches, and trailing signs, converting
the data to a format virtually all data bases on PC's can interprete. MM
assumes that you already have the mainframe data on your PC as ascii text
and simply want to convert it to a format other PC programs can process.
HOW DOES MM WORK?
MM works by passing it necessary parameters in the DOS command line.
The format is
MM[/<options>] [file to edit] [output file] [conversion table]
where
<options> are either nothing or B (for BATCH, default is non-batch),
or T (for TEST, default are non-test).
<file to edit> is the name of the mainframe data file. Default is
MM.ZON.
<output file> is the converted file. Default is MM.DMZ.
<conversion table> is the file name of the parameters the conversion
uses. Default is CONV.TBL.
The data file and output file can be the same, in which case MM will
write the output to a temporary work file and after processing is
done, delete the old file and rename the temporary file to the old
name.
All parameters are optional and go to their default value if none is
provided. Note that to override the default on any parameter, the earlier
ones must also be supplied.
MM will normally present a screen stating what it will do and let you
abort the job or run it. However, if you want to run totally batch and
bypass the confirmation, add "/B" to the command line. "/B" can be anywhere
in the DOS command line but the other parameter must occur in the stated
order.
In TEST mode, MM will display each field in each record that it processes
along with what it converted it to, and ask the user whether he wants
to abort the processing, continue a field at a time, or go non-stop
without displaying the fields and their values. TEST is useful for
determining whether the conversion table is set up properly and whether
the processing is going as expected. Single stepping through the
conversion is too slow for normal processing. Users should either
abort the process if it is apparent that it is not working properly
or go non-stop when satisfied that the conversion does work.
Note: running batch in compatible with running test and will override
it.
Examples:
MM Execute MM taking all defaults
MM FILE.IN FILE.OUT CONV.MM Convert file FILE.IN, write out as
FILE.OUT, get conversion specifics
from file CONV.MM.
MM/B TURNER.113 TURNER.DMZ Convert file TURNER.113 to TURNER.DMZ
(using CONV.TBL for specifics). Run
batch - do not ask for confirmation
on parameters.
MM/T D:\IRMA\PAYROLL Convert file D:\IRMA\PAYROLL to
MM.DMZ using CONV.TBL. Display
the conversions for each field
and wait for instructi